package com.zyndev.tool.validation;


import com.zyndev.tool.validation.core.NotNullValid;
import com.zyndev.tool.validation.core.SizeValid;

/**
 * @author 张瑀楠 wb.yunan.zhang@renren-inc.com
 * @version 1.0
 * time: 2017/11/30 15:49
 * TODO:
 */
public class ValidatorFactory implements AutoCloseable {

    public static Validator getValidator() {
        ValidatorImpl validator = new ValidatorImpl();
        validator.addValidRole(new NotNullValid());
        validator.addValidRole(new SizeValid());
        return validator;
    }

    @Override
    public void close() throws Exception {

    }
}
